<!doctype html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.css" rel="stylesheet" />
		<link href="../css/common.css" rel="stylesheet" />
		<style>
			.mui-table-view{
				margin-top: 16px;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav xq-window-header">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">设置</h1>
		</header>
		<div class="mui-content">
			
		</div>
		<script src="../js/mui.js"></script>
		<script src="../js/jquery-3.3.1.js"></script>
		<script src="../js/commonUtils.js"></script>
		<script type="text/javascript">
			mui.init();
			mui.ready(function(){
				if(mui.os.plus){
					return;
				}
				initRemotePageView();
			});
			
			mui.plusReady(function () {
				var self=plus.webview.currentWebview();//创建一个新的页面
				var toPageUrl=self.toPageUrl;
				var title = self.title;
			    initRemotePageView(toPageUrl,title);
			})
			
			
			function initRemotePageView(pageUrl,title){
				if(title){
					$('.xq-window-header .mui-title').html(title);
				}
				//var nwaiting = plus.nativeUI.showWaiting();//打开原生加载等待框
				var realPageUrl=pageUrl;
				if(!realPageUrl.startsWith('http') && !realPageUrl.startsWith('https')){
					var addSplit='';
					if(!realPageUrl.startsWith('/')){
						addSplit='/';
					}
					realPageUrl = getShiciServiceHost() + addSplit + realPageUrl;
				}
				var ws=plus.webview.currentWebview();//创建一个新的页面
				var embed=plus.webview.create(realPageUrl,"",{bottom:"0px"});//新的页面地址
				embed.onclose=embedClose;
				ws.append(embed);
			}
			
			// 页面关闭事件回调函数
			function embedClose(e){
				alert( "Closed!");
			}
		</script>
	</body>

</html>
